Data rewriting apparatus, control method, and recording medium

ABSTRACT

The present invention presents a data rewriting apparatus, a control method, and a recording medium, for rewriting the data stored in a nonvolatile memory limited in rewriting, provided in the apparatus, by making use of a program for executing update being supplied from a detachable recording medium, and data used in updating.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a data rewriting apparatus forupdating the data recording in a nonvolatile memory provided in anapparatus and limited in rewriting, on the basis of an updating programand updating data supplied from a detachable recording medium in theapparatus, and also a control method and a recording medium.

[0003] 2. Description of the Related Art

[0004] In certain microcomputers incorporated in personal digitalassistants, at present, a ROM data storage area for storing programs isused as a flash memory, and there is a function of rewriting the programfor controlling the apparatus stored in the flash memory or the datanecessary when operating the program from outside, for the purpose ofadding a function of the apparatus or enhancing the performance, forexample, after mounting on the substrate. Usually, in suchmicrocomputers, the serial interface to be provided as part of thefunction or the serial communication interface for realizing rewritingfrom outside of the apparatus is provided in the apparatus, and it isdesigned to write the ROM data from an external writing device by usingserial communication.

[0005] Generally, rewriting operation of ROM data for such functionaddition or function enhancement is a very dangerous task thatdetermines the operation of the apparatus, and it is designed not to getinto a writing state easily by mistake. Therefore, conventionally, whenrewriting the ROM data, for example, at a service center or a repairshop, by opening the cover of the apparatus to be accessible to theinside parts, a hard wiring such as jumper wire for transmitting acontrol signal necessary for getting into rewriting operation issoldered, or physical operation is required such as changeover of wiringor changeover of switch, so that the program for rewriting the ROM datastored in the apparatus may not be put into the ROM data rewritingoperation by mistake by the user or other accident.

[0006] In a car navigation system, a CD-ROM for rewriting ROM data orthe like is loaded in the navigation system, and the ROM data isrewritten by a program loader provided in the navigation system having astable power source, so that a new function is added or navigation datais updated.

[0007] Further, in an Internet router, to use a new Internet protocol ornetwork application program, for example, or to add newly a program forprotecting the LAN (local area network) from cracking, by a program fordownloading a file for updating provided in the router, a ROM datarewriting file is supplied from the server into the router, and the ROMdata is similarly rewritten by the program loader provided in the routerhaving a stable power source.

[0008] Lately, by forming a small storage medium having a solid memoryelement such as flash memory, it is proposed to store computer data,video data and audio data by using an exclusive drive device orincorporating a drive device in an audio and video appliance orinformation device.

[0009] However, such ROM data rewriting operation requires changeover ofelectric circuit of the apparatus in order to avoid rewriting of ROMdata by mistake, and if the apparatus is disassembled by the serviceengineering or service provider, or the program is rewritten by theuser, it is necessary to prepare special tools and connect to thespecified external terminal of the apparatus, which was veryinconvenient.

[0010] Or, in the personal digital assistant in which the power sourceis not stable, the operation of the microcomputer may become unstabledue to sudden fluctuations or a drop of the supply voltage, or, in aworst case, the program for rewriting the ROM data may be put intooperation by runaway, and therefore the program loader for rewriting theROM data cannot be provided in the apparatus, which was alsoinconvenient.

[0011] In the storage system using such solid memory element, it isdemanded to process the stored file efficiently. For example, it isrequired that the data moving, duplication and rewriting necessary forfile processing in the storage medium should be a minimum limit, or thatthe processing time and power consumption should be a minimum limit.

[0012] By contrast, in the development environment of many programs suchas ROM data mentioned above, since the FAT (file allocation table) isused as the file system, it is convenient for copying the ROM data ifthe ROM data is described as a file system such as FAT in the case ofwriting ROM data into the microcomputer through a recording medium. Inthis case, however, it is required on the apparatus side to interpretthe file system of a relatively large scale such as FAT, and henceprocessing of recorded data is very complicated.

[0013] More specifically, between a physical address for using thephysical access to the flash memory, and a logical address forprocessing the data in the logic space by using the FAT, the addressconverting operation is required in the memory access driver unit in theapparatus, by using a logic-physical address conversion table forconverting, for example, between the logical address handled in thelogic space provided on the flash memory and the physical address usedwhen actually accessing the flash memory. Further, on the preliminarycondition of the physical specification that the erasing unit of flashmemory is greater than the writing unit. In the FAT, moreover, since thedata is accessed by using the recording capable of overwriting the data,when using the flash memory required to writer after erasing, theerasing process and writing process on the flash memory must be alsodone in the memory access driver when a writing request is made in theFAT.

[0014] When using the FAT as the file system, usually, the process ofopening the file and writing the data is needed when writing the data,but as the internal processing in the apparatus at this time, itrequires block swapping process of changing or partly erasing the datato be done by changing the logical address to the logical address beforechange by writing the changed data into the block of the specifiedphysical address already erased in the erasing unit of the flash memory,and also the process of converting the logical address used by the FATfile system and the physical address which is the physical allocationsequence of the flash memory by means of the conversion table, and suchcomplicated process took much time and labor.

SUMMARY OF THE INVENTION

[0015] The present invention presents a data rewriting apparatus capableof detaching a recording medium which stores update data for updatingthe data stored in the data rewriting apparatus, program data fortransferring the update data to the data rewriting apparatus, anddiscrimination data for discriminating recording of the update data andprogram data, comprising:

[0016] loading means for inserting the detachable recording medium intothe apparatus main body,

[0017] first memory means for reading and storing the program data fortransferring the update data into the data rewriting apparatus recordedon the recording medium,

[0018] detecting means for detecting the discriminating data from therecording medium,

[0019] second memory means provided inside the rewriting apparatus forstoring the data to be updated, and

[0020] control means for reading out the program data for transferringthe update data into the data rewriting apparatus on the basis of thedetected discriminated data from the recording medium and storing intothe first memory means, when the discriminating data is detected fromthe recording medium by the detecting means, reading out the updateddata recorded in the recording medium on the basis of the program datastored in the first memory means, and updating the data stored in thesecond memory means in the data rewriting apparatus.

[0021] Further, the present invention also presents a control method ofstoring update data by transferring into a data rewriting apparatus fromthe data rewriting apparatus and a detachable recording medium storingupdate data for updating the data stored in the data rewritingapparatus, program data for transferring the update data to the datarewriting apparatus, and discrimination data for discriminatingrecording of the update date and program data, comprising:

[0022] a step of detecting the discrimination data from the recordingmedium,

[0023] a step of reading out the program data from the recording mediumon the basis of the detected discrimination data when the discriminationdata is detected from the recording medium, and

[0024] a step of reading out the update data for updating the datastored in the data rewriting apparatus from the recording medium on thebasis of the program data being readout, and updating the data stored inthe apparatus by the update data being read out.

[0025] In the invention, moreover, the recording medium comprises:

[0026] an update data recording region for recording the update data forupdating the data stored in the installed data rewriting apparatus,

[0027] a program data recording region for recording the program datafor transferring the update data to the data rewriting apparatus, and

[0028] a discrimination data recording region or recording thediscrimination data for discriminating recording of the update data andprogram data.

DESCRIPTION OF THE DRAWINGS

[0029]FIG. 1 is an explanatory diagram of a file system processinghierarchy according to an embodiment of the invention;

[0030]FIG. 2 is a diagram showing the composition of a personal digitalassistant and plate memory according to the embodiment;

[0031]FIG. 3 is a data flow diagram between a microcomputer and platememory according to the embodiment;

[0032]FIG. 4 is a flowchart showing flash ROM rewriting operationaccording to the embodiment;

[0033]FIG. 5 is a flowchart showing creating operation of necessary dataaccording to the embodiment;

[0034]FIG. 6 is a diagram showing the composition of physical addressfile according to the embodiment;

[0035]FIG. 7A shows examples of header data according to the embodiment,particularly relating to the header data on the discrimination file andthe header data in the case of loading from the personal computer;

[0036]FIG. 7B shows examples of header data according to the embodiment,particularly relating to the header data to the discrimination file andthe header data in the case of loading from the plate memory;

[0037]FIG. 7C shows examples of header data according to the embodiment,particularly relating to the program loader file and header data of ROMdata file; and

[0038]FIG. 8 is a diagram showing the storage state of the data in theplate memory in which the program for rewriting the flash ROM is storedaccording to the embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0039] A preferred embodiment of the invention is described below. Thestorage medium of the embodiment is a plate memory having a plate shape,and the personal digital assistant of the invention corresponds to aportable terminal capable of recording and reproducing a file on a platememory.

[0040] [Shape of plate memory] First, the shape of the plate memory, thestorage medium of the embodiment, is explained. The plate memory has amemory element of a specific capacity in the plate casing. For example,a flash memory is used as the memory element.

[0041] From the lower part of the front of the casing to the bottomside, there is a terminal section having nine electrodes, and from thisterminal section, reading or writing is operated on the inside memoryelement through the detachable mechanism of the portable terminal mainbody side. There is a notch in the upper left portion in the planedirection of the casing. This notch is formed in order to preventinsertion in a wrong direction when loading this plate memory into thedetachable mechanism of the portable terminal main body side. Further atthe bottom side, there is a slide switch for preventing erasure ofmemory by mistake.

[0042] [Format of plate memory] [Memory file system processinghierarchy] The format of the plate memory in the system is explained.FIG. 1 shows the file system processing hierarchy in the system usingthe plate memory as the storage medium. As shown in FIG. 1, the filesystem processing hierarchy consists of a file management processinglayer 61, a logical address layer 62, a physical address layer 63, and aflash memory access layer 64, which are sequentially formed beneath anapplication processing layer 60. In this hierarchy, the file managementprocessing layer 61 is the so-called FAT (file allocation table). Asknown from the diagram, in the file system of the embodiment, theconcept of logical address and physical address is introduced, which isdescribed later.

[0043] In particular, in the embodiment, in the application processinglayer 60, there is an address file processing unit 65 for startngprocessing of the address file by performing input operation forprocessing to generate the address of program loader file storing therewriting program for executing a rewrite of the program data describedlater by an exclusive device and the ROM data file storing the programdata, and in this case, immediately, by referring to the physicaladdress table 67 place, for example, in the RAM, the physical address onthe flash memory corresponding to the logical address of the specifiedindex file is acquired, and the physical address is written by aphysical address write processing unit 66 provided in the flash memoryaccess layer 64. Then the ROM data file is written by using the programloader file in the personal data assistant described later in the platememory taken out of the exclusive device.

[0044] Thus, in the address file processing, the flash memory accesslayer 64 can be used directly without using the file managementprocessing layer 61, logical address layer 62 and physical address layer63, and therefore although the file in the FAT file system is used,complicated process of FAT file system is not needed, and the processingtime can be shortened. The exclusive device refers to any device havinga function of writing the physical address in the plate memory byreferring to the physical address table 67 composed of the RAM by usingthe file system for managing the logical address and physical address ofthe FAT file system or the like.

[0045] In the embodiment, especially in the exclusive device, thephysical address table 67 is provided, and by the address fileprocessing unit 65 which starts address file processing realized as afunction of the microcomputer when the start key of processing ofaddress file in the operation unit is pressed, immediately referring tothe physical address table 67, the physical address on the flash memorycorresponding to the logical address of the specified program loaderfile and ROM data file is acquired, and the physical address of theprogram loader file and ROM data file is written by accessing the platememory 7 incorporating the flash memory by the physical address writingprocessing unit 66 realized as a function of the microcomputer.

[0046] In recording and reproducing processing of record data file orreproduction data file, all of the application processing layer 60, filemanagement processing layer 61, logical address layer 62, physicaladdress layer 63, and flash memory access layer 64 are used.

[0047] [Structure of physical data] The physical data structure of theflash memory which is a storage element in the plate memory isexplained. The storage region in the flash memory consists of segments,which are data units of a fixed length. One segment is a specified sizeof 4 MB or 8 MB, and the number of segments in one flash memory dependson the capacity of the flash memory.

[0048] One segment is divided into blocks, which are data units of afixed length of 8 KB or 16 KB. In principle, one segment is divided into512 blocks, and hence block n means n=511. In the flash memory, however,there are a specific number of blocks as defect areas which are flawareas not to be written in, and the substantial number n of blocks inwhich data can be written is smaller than 511.

[0049] Of the formed blocks 0 to n, the first two blocks 0 and 1 areboot blocks. Actually, however, the first two valid blocks are bootblocks, which are not always blocks 0 and 1. The remaining blocks areuser blocks in which user data is stored.

[0050] One block is divided into pages 0 to m. The capacity of one pageconsists of data area of 512 bytes and a redundant area of 16 bytes. Thefixed length is 528 (=512+16) bytes. The structure of the redundant areais explained later. The number of pages in one block is 16 in the blockwith capacity of 8 KB, and 32 in the case of 16 KB.

[0051] The page structure in the block is common in the boot block andthe user block. In the flash memory, the data is read or written in thepage unit, while the data is erased in the block unit. The data can bewritten only into erased page. Therefore, actual data rewriting orwriting is done in the block unit.

[0052] In the beginning boot block, a header is stored in page 0, andinformation showing address as position of initial defect data is storedin page 1. In page 2, information known as CIS/IDI (card informationstructure/identify drive information) is stored. The second boot blockis used as a backup region as boot block.

[0053] [Concept of physical address and logical address] With theunderstanding of the physical data structure in the flash memorymentioned above, the concept of physical address and logical address inthe file system of the embodiment is explained below according to theprocedure of the data rewriting operation.

[0054] Each block is assigned with a physical address. This physicaladdress is determined by the physical array sequence of blocks in thememory, and the relation between a certain block and its correspondingphysical address is invariable.

[0055] There are used blocks in which block data is stored, and unusedblocks in which block data has been erased, that is, unrecorded regions.

[0056] The logical address is the address assigned to accompany the datawritten in the block. This logical address is the address to be used bythe FAT file system described below.

[0057] In this state, as updating of data stored in the physicaladdress, suppose the content is rewritten or partly erased. In such acase, in the file system of the flash memory, updated data is notwritten again into the same block, but the updated data is written intoan unused block.

[0058] In the state before updating of data, the logical address ischanged so that the logical address corresponding to the physicaladdress before updating may correspond to the logical address afterupdating of the block in which the updated data is written.

[0059] That is, the physical address is the address specifically givento the block, whereas the logical address accompanies the data oncewritten in the block, that is, it is the address specific to the writtendata in the block unit.

[0060] By such block swapping process, repeated and concentratedaccesses to a same storage region of block can be avoided, which canextend the life of the flash memory that is limited in the upper limitof the number of times of rewriting.

[0061] At this time, by handling the logical address as mentioned above,if the block to be written in is moved in the data before updating andafter updating as a result of the block swapping process, the sameaddress is seen from the FAT, and hence the subsequent access may beexecuted appropriately.

[0062] For the purpose of ease of management for updating on thelogical-physical address conversion table described below, the blockswapping process is completed within one segment. In other words, blockswapping process does not occur between plural segments.

[0063] [Logical-physical address conversion table] As understood fromthe explanation above, by swapping of blocks, the correspondence betweenthe physical address and logical address is changed. Therefore, torealize the access for writing and reading of data in the flash memory,the logical-physical address conversion table showing the correspondencebetween the physical address and logical address is necessary. That is,the FAT refers to the logical-physical address conversion table, and thephysical address corresponding to the logical address designated by theFAT is determined, and it is possible to access the block indicated bythis determined physical address. In other words, without thelogical-physical address conversion table, the FAT cannot access theflash memory.

[0064] A structural example of the logical-physical address conversiontable is shown. The logical-physical address conversion table is storedin a certain block designated to be present in the last segment of theflash memory. First, a region of two pages, that is, pages 0 and 1 ofthe pages composing the block is assigned as a logical-physical addressconversion table for segment 0. For example, if the flash memorycapacity is 4 MB, there is only one segment, and hence only this regionof pages 0 and 1 is a region of the logicalphysical address conversiontable.

[0065] In the case of the flash memory with a capacity of 8 NB, sincethere are two segments, in addition to pages 0 and 1 assigned as alogical-physical address conversion table for segment 0, the succeedingpages 2 and 3 are assigned as a logical-physical address conversiontable for segment 1.

[0066] Likewise, as the flash memory capacity is increased, assigningregions of logical-physical address conversion table for each segmentare set in every two pages successively. In the case of the maximumcapacity of 128 MB, there are 16 segments, and pages for up to segment15 are assigned as regions for logical-physical address conversiontables. That is, in the flash memory with the maximum capacity of 128MB, 30 pages are used, and page N is N=29 at maximum. As known from theexplanation so far, the logical-physical address conversion tables aremanaged in every segment.

[0067] To show the structure of the logical-physical address conversiontable per segment, a data area of two pages is extracted and shown. Thatis, since the data area of one page is 512 bytes, a total of 1024 bytes(=512×2) are shown.

[0068] The relation between the flash memory capacity and size oflogical-physical address conversion table is explained. As describedabove, the size of the logical-physical address conversion table formanaging one segment is 1024 bytes corresponding to 2 pages, that is, 1KB. Therefore, in the flash memory with a capacity of 4 MB having onesegment, the size of the logical-physical address conversion table is 1KB. In the flash memory with a capacity of 8 MB having 2 segments, thesize of the logical-physical address conversion table is 2 KBcorresponding to 4 pages.

[0069] In the flash memory with a capacity of 16 MB, in the case of 2048blocks=4 segments, the size of the logical-physical address conversiontable is 4 KB corresponding to 8 pages, and in the case of 1024 blocks=2segments, the size of the logical-physical address conversion table is 2KB corresponding to 4 pages.

[0070] In the flash memory with a capacity of 32 MB or 4 segments, thesize of the logical-physical address conversion table is 4 KB or 8pages, in the flash memory with a capacity of 64 MB or 8 segments, thesize of the logical-physical address conversion table is 8 KB or 16pages, and in the flash memory with a maximum capacity of 128 MB or 16segments, the size of the logical-physical address conversion table is16 KB or 32 pages.

[0071] [Structure of personal digital assistant and plate memory]Referring next to FIG. 2, the structure of the personal digitalassistant and the plate memory is explained. FIG. 2 shows the structureof the main body of the personal digital assistant capable of reading,writing, and editing data in the plate memory as explained above. Thefile storage system is composed of the set main body 20 and the platememory 7 shown in the diagram.

[0072] The set main body 20 can handle many types of data to be writtenread in the plate memory 7, including, for example, moving image data,still image data, voice data, other audio data, high quality audio dataas reproduced from CD (compact disc), MD (mini disc) or TM, and controldata.

[0073] To simplify the explanation, the system of storing andreproducing speech data is explained, but it can be also used as thestorage system of moving image and other data file by installing theinput and output system and processing system for moving image, stillimage, audio data, etc., in the set main body 20.

[0074] The set main body 20 comprises a detachable mechanism 13 formounting this detachable set main body 20, and the data is exchangedbetween the plate memory 7 loaded in this detachable mechanism 13 andthe built-in microcomputer for control by way of a host interface IC notshown in the drawing.

[0075] The set main body 20 also comprises a microphone not shown in thedrawing, and the audio signal of speech or diction collected by themicrophone is supplied into the DSP (digital signal processor) as audiosignal through a microphone amplifier. In the DSP, this entered audiosignal is converted into digital audio data, and processed by encodingand other operation, and is supplied into the microcomputer 1 asrecorded data. The microcomputer 1 executes the process of storing thisrecorded data into the plate memory 7 through the host interface IC.

[0076] The microcomputer 1 also reads out the audio data stored in theplate memory 7 through the host interface IC, and supplies this read-outdata into the DSP. In the DSP, the supplied data is demodulated andprocessed, and is finally sent out into the speaker amplifier as analogaudio signal. In the speaker amplifier, the entered audio signal isamplified, and is delivered to the speaker. As a result, the reproducedaudio is delivered.

[0077] Further, the microcomputer 1, by controlling the display driver,displays a desired image in the display unit. For example, the menu orguide display for assisting the user's operation, or the file contentstored in the plate memory 7 is displayed. Or, when image data of movingimage or still image is stored in the plate memory 7, the image data isread out, and displayed in the display unit.

[0078] In the embodiment, the microcomputer 1 comprises a flash ROM 2for storing the ROM data file which stores program data for control, aninternal RAM 3 for storing the program loader file which stores therewrite program for executing rewriting of control data and programdata, a write enable terminal 4 for controlling the rewrite function ofthe program data stored in the flash ROM 2 in disable state or enablestate, an output terminal 5, and a jumper wire 14 used in transmissionof control signal of disable state or permit state of the rewritefunction of program data by connecting the write enable terminal 4 andoutput terminal 5. Further, the microcomputer 1 also comprises anexternal RAM 6 for temporarily storing the program loader file whichstores the rewrite program for executing rewriting of program data.

[0079] Thus, the microcomputer 1 having the rewrite function of theflash ROM 2 has the write enable terminal 4 for controlling whether ornot to rewrite the flash ROM 2 as the function of the hardware. Theoutput terminal 5 of the microcomputer for controlling this write enableterminal 4 is connected by the jumper wire 14, and usually the writeenable terminal 14 is controlled in the write disable state. Herein, thefunction of controlling the write enable terminal 4 in the write enablestate through the jumper wire 14 from the output terminal 5 and enablingto rewrite the flash ROM 2 is not present in the ROM data of the flashROM 2 of the set main body 20 side in the initial state.

[0080] In the embodiment, considering the safety of preventingaccidental rewriting or erasing of program data, the function ofcontrolling the write enable terminal 4 in the write enable statethrough the jumper wire 14 preliminarily wired to, for example, theprint pattern of the printed circuit board from the output terminal 5and enabling to rewrite the flash ROM 2 is provided in the programloader composed of the software module stored in the plate memory 7.Only when this program loader is read into the internal RAM 3 of themicrocomputer 1, the write disable state of the write enable terminal 4is cleared and controlled in the write enable state, and by this programloader, a new ROM data file is written into the flash ROM 2, so that theROM data can be rewritten.

[0081] At the plate memory 7 side, a program loader file 9 storing therewrite program for executing rewriting of program data, and a ROM datafile 11 storing new program data for control are stored.

[0082] Further, the plate memory 7 of the embodiment connected to thepersonal digital assistant 20 through the detachable mechanism 13includes a plate memory discrimination file for loader 8 fordiscriminating whether this plate memory 7 has stored or not the programloader file 9 which is an official program for rewriting program dataand the ROM data file 11.

[0083] Thus, since the plate memory discrimination file for loader 8 isprovided in the plate memory 7, and the program loader file 9 isprovided at the plate memory 7 side, not at the set main body 20 side,it is possible to prevent a rewrite and destruction of the ROM data byunexpected operation such as runaway of the microcomputer 1 due tounstable power supply in the personal digital assistant 20.

[0084] In the embodiment, the plate memory 7 holds a program loaderaddress file 10 storing the address of the program loader file 9, and aROM data address file 12 storing the address of the ROM data file 11.

[0085] Herein, the physical addresses of the program loader address file10 and ROM data address file 12 are written in as follows. As explainedin FIG. 1, in the exclusive device, the physical address conversiontable 67 is provided, for example, on the RAM, and by the address fileprocessing unit 65 realized as a function of the microcomputer forstarting address file processing when the start key of processing ofaddress file in the operation unit is pressed, immediately referring tothe physical address table 67, the physical address on the flash memorycorresponding to the logical address of the specified program loaderfile and ROM data file is acquired, and the physical address of theprogram loader file and ROM data file is written by accessing the platememory 7 by the physical address writing processing unit 66 realized asa function of the microcomputer.

[0086] In the operation unit not shown in the drawing, various keys areprovided to be used by the user for various operations of the set mainbody 20. The microcomputer 1 receives a command corresponding to theoperation done in this operation unit, and executes the specifiedcontrol process corresponding to the command. Operations include the ROMdata rewrite instruction, file storage instruction, file selectioninstruction, file reproduction instruction, and edit instruction.

[0087] The structure of the set main body 20 shown in FIG. 2 is only anexample, and is not limitative. That is, as far as the data can betransmitted and received with the plate memory 7, any type of electronicappliance may be used.

[0088] Referring now to FIG. 3, an outline of operation is explained. Ofthe parts shown in FIG. 3, those same as in FIG. 1 and FIG. 2 areidentified with same reference numerals.

[0089] The microcomputer 1 comprises a flash ROM 2 and a RAM 3, and inFIG. 3, in order to explain as a functional block, the flash ROM 2 isdivided into a flash ROM A and a flash ROM B. It is not required to beseparated physically, but, for example, a same flash ROM may be used bydividing by the block address.

[0090] In the plate memory 7, same as the block shown in FIG. 2, adiscrimination file 8, a program loader address file 10, a programloader file 9, a ROM data address file 12, and a ROM data file 11 arestored.

[0091] In the initial state, the control program before addition offunction is stored in the flash ROM of the microcomputer 1, and the datausing the control program before addition of function is stored in theRAM 3.

[0092] The flash ROM A of the microcomputer 1 stores the program loaderaddress file as a program for judging whether the program stored in theplate memory 7 for rewriting the control program before addition offunction stored in the flash ROM B is stored or not, and for rewriting,and a rewrite program loader 15 as the program for loading the programloader.

[0093] The personal digital assistant 20 has the plate memory 7 whichstores the discrimination file 8, program loader address file 10,program loader file 9, ROM data address file 12, and ROM data file 11,and the rewrite program loader 15 stored in the flash ROM A is executedwhen an update instruction of program is entered. The rewrite programloader 15 searches the discrimination file 8 while accessing the platememory 7 by the physical address as shown in (1). When thediscrimination file 8 is detected, it is judged that the data and datarewrite program for updating the control program stored in the flash ROMprovided in the microcomputer 1 of the personal digital assistant 20 isstored in the plate memory 7 presently provided in the personal digitalassistant 20.

[0094] When the discrimination file 8 is detected, the rewrite programloader 15 searches the program loader address file 10 by accessing theinside of the plate memory 7 by the physical address as shown in (2).When the program loader address file 10 is detected, the rewrite programloader 15 designates the stored position of the program loader 9 storedin the plate memory 9 on the basis of the program loader address file 10as shown in (3), and from the address designated as in (4), the programloader 9 is loaded into the RAM 3 provided in the microcomputer 1.

[0095] After all program loaders 9 are loaded in the RAM 3, the rewriteprogram loader 15 transfers the control to the program loader 16developed on the RAM 3. More specifically, the microcomputer 1 executesthe instruction for jumping to the execution start address of theprogram loader 16 so that the program may be executed by themicrocomputer 1 from the execution start address of the program loader16 developed on the RAM 3.

[0096] The program loader 16 on the RAM 3 having the execution controlright searches the ROM address file by accessing the plate memory 7 bythe physical address as shown in (5).

[0097] The program loader 16 on the RAM 3, when the ROM data addressfile 12 is detected, accesses the ROM data file 11 from the plate memory7 according to the detected ROM data address file 12, and writes therewrite data to be read into the flash ROM B while erasing the region inwhich the program to be updated of the flash ROM B of the microcomputer1 has been recorded.

[0098] Of the ROM data files 11 stored in the plate memory 7, whennecessary data is all written into the flash ROM B of the microcomputer1, the program loader 16 stored in the RAM 3 executes, for example, aRESET instruction so that the microcomputer operates to initialize, andthe microcomputer 1 is controlled so as to operate the program forcontrolling the personal digital assistant 20 recorded in the flash ROM2.

[0099] The microcomputer 1, by executing the initialize program, erasesthe program loader 16 stored on the RAM 3, thereby returning to theordinary processing operation.

[0100] [Flowchart of flash ROM rewrite operation] The operation of theembodiment is explained by referring to the flowchart of flash ROMrewrite operation in FIG. 4. In FIG. 4, in the personal digitalassistant 20 controlled in write disable state of ROM data shown in FIG.2, the ROM data is rewritten by using the program data file 9 and ROMdata file 11 stored in the plate memory 7.

[0101] In FIG. 4, starting the flash ROM rewrite process, at step S1,the microcomputer 1 judges if the plate memory discrimination file forloader 8 is stored or not in the plate memory 7 connected in the mainbody of the personal digital assistant. Specifically, the microcomputer1 detects whether the plate memory discrimination file for loader 8 hasthe header as the identifier for discriminating whether or not thisplate memory has stored the official program loader file 9 for rewritingthe program loader and the ROM data file 11.

[0102] The composition of the physical address file is shown in FIG. 6.In FIG. 6, the access for writing, reading or erasing in the flashmemory by the physical address is executed as follows. First, the blockis searched from the beginning in the sequence of physical addressesuntil finding a correct header 40 for accessing for writing, reading orerasing. Next, when the correct header 40 is searched in the firstprocess, the corresponding physical address 41 is acquired. Thus, thedesired physical address is accessed.

[0103]FIG. 7A, FIG. 7B, and FIG. 7C show examples of header data ofdiscrimination file. The loading method of program loader file 9 and ROMdata file 11 includes a method of connecting a personal computer to themain body of the personal digital assistant through an interface andloading from the personal computer, and a method of connecting the platememory to the main body of the personal digital assistant and loadingfrom the plate memory.

[0104] In FIG. 7A, when loading from the personal computer, as thediscrimination data 50, ABC DEF MEMSTICK PROGRAM LOADER LOAD FROM PC isstored, and after a space 51, “32” is entered as the number of pages 52indicating the storage region per block.

[0105] In FIG. 7B, when loading from the plate memory, as thediscrimination data 53, ABC DEF MEMSTICK PROGRAM LOADER LOAD FROM MS isstored, and after a space 54, “16” is entered as the number of pages 55indicating the storage region per block.

[0106] Detecting the header data as such identifier, when it isrecognized by the microcomputer that it is the plate memory in whichofficial ROM data is recorded, the operation goes to step S2.

[0107] Then, at step S2, the microcomputer 1 reads in the program loaderfile 10 which is an address file of the program loader as the softwaremodule. Specifically, as explained in FIG. 1, in the exclusive device,the physical address table 67 is provided on the RAM, and by the addressfile processing unit 65 realized as a function of the microcomputer 1for starting address file processing when the start key of processing ofaddress file in the operation unit is pressed, immediately referring tothe physical address table 67, the physical address on the flash memorycorresponding to the logical address of the specified program loaderfile is acquired, and the physical address of the program loader file iswritten by accessing the plate memory 7 by the physical address writingprocessing unit 66 realized as a function of the microcomputer 1. Byreading in this program loader address file 10, the microcomputer 1 ofthe personal digital assistant 20 is not required to interpret the hugeprogram such as FAT.

[0108] At step S3, the microcomputer 1 reads the program loader file 9storing the program loader as software module, into the internal RAM 3.Specifically, using the physical address data of the program loaderaddress file 10, the microcomputer 1 accesses the storage region of theplate memory 7, and reds out the program loader file 9 storing theprogram loader as software module, and writes it into the specifiedregion on the internal RAM 3.

[0109]FIG. 7C shows an example of header data of the program loaderfile. In FIG. 7C, as the discrimination data 56, ABC DEF MEMSTICKPROGRAM LOADER is stored, and as the file name 57, romdata.dat isstored, and after a space 58, 0×00A3, 0×003F, 0×FFF are stored as thephysical block address data 59.

[0110] At step S4, the microcomputer 1 reads in the ROM data addressfile 12 which is an address file of the ROM data file. Specifically, asexplained in FIG. 1, in the exclusive device, the physical addressconversion table 67 is provided on the RAM, and by the address fileprocessing unit 65 realized as a function of the microcomputer 1 forstarting address file processing when the start key of processing ofaddress file in the operation unit is pressed, immediately referring tothe physical address table 67 on the RAM, the physical address on theflash memory corresponding to the logical address of the specified ROMdata file is acquired, and the physical address of the ROM data addressfile is written by accessing the plate memory 7 by the physical addresswriting processing unit 66 realized as a function of the microcomputer1. By reading in this ROM data address file 12, the microcomputer 1 ofthe personal digital assistant 20 is not required to interpret the hugeprogram such as FAT.

[0111] Since the program loader file 9 and program loader address file10 are recorded on the FAT file system, it is easy to write into thepersonal digital assistant 20 from the personal computer. At step S5,the microcomputer 1 writes the ROM data file 11 storing the ROM datainto the external RAM 6. Specifically, using the physical address of theROM data file 11, the microcomputer 11 accesses the storage region ofthe plate memory 7, and reads out the ROM data file 11 storing the ROMdata, and writes into the specified region on the external RAM 6.

[0112]FIG. 7C shows an example of header data of the ROM data file. InFIG. 7C, as the discrimination data 56, ABC DEF MEMSTICK PROGRAM LOADERis stored, and as the file name 57, romdata.dat is stored, and after aspace 58, 0×00A3, 0×003F, 0×FFFF are stored as the physical blockaddress data 59.

[0113] At step S6, the microcomputer 1 starts the program loader on theinternal RAM. Specifically, the microcomputer 1 starts the programloader stored in the internal RAM, controls the output terminal 5, andissues a control signal for controlling the write enable terminal 4 intoa rewrite enable state through the jumper wire 14 from the outputterminal 5.

[0114] At step S7, the microcomputer 1 changes the write enable terminal4 into a write enable state. Specifically, the microcomputer 1 controlsthe output terminal 5 so that the written enable terminal 4 may be setin rewrite enable state on the basis of the control signal issued fromthe output terminal 5.

[0115] In this way, the function for enabling to rewrite the flash ROM 2is provided in the program loader composed of the software module storedin the plate memory 7, and only when this program loader is read intothe internal RAM 3 of the microcomputer 1, the write disable state ofthe write enable terminal 4 is cleared and controlled to be in writeenable state.

[0116] At step S8, the microcomputer 1 write the ROM data file on theexternal RAM. Specifically, the microcomputer 1 writes the ROM datastored in the external RAM 6 into the flash ROM 2.

[0117] Thus, the ROM data is rewritten by writing a new ROM data fileinto the flash ROM 2.

[0118] [Flowchart of necessary data creation operation] The operation ofthe embodiment is explained next by referring to the flowchart ofnecessary data creation operation in FIG. 5. FIG. 5 is an explanation ofcreation of plate memory discrimination file for loader 8, programloader file 9, ROM data file 11, program loader address file 10, and ROMdata address file 12 stored in the plate memory 7 shown in FIG. 2 bymeans of an external device such as exclusive device or personalcomputer.

[0119] In FIG. 5, starting data creation process, at step S11, the platememory is initialized by the exclusive device. Specifically, the platememory is connected to the exclusive device capable of formatting into afile system such as FAT to initialize so as to erase unnecessary data.

[0120] At step S12, the plate memory is connected to the personalcomputer. Specifically, the plate memory is connected to the personalcomputer through a specified interface.

[0121] At step S13, the program loader file is written in from thepersonal computer. Specifically, by formatting the plate memory by theexclusive device for file system such as FAT, the program loader filepreliminarily created on the personal computer can be recorded into theFAT file system, so that the program loader file can be easily writteninto the plate memory 7 from the personal computer.

[0122]FIG. 7C shows an example of header data of the program loaderfile. In FIG. 7C, as the discrimination data 56, ABC DEF MEMSTICKPROGRAM LOADER is stored, and as the file name 57, romdata.dat isstored, and after a space 58, 0×00A3, 0×003F, 0×FFFF are stored as thephysical block address data 59.

[0123] At step S14, the ROM data file is written in from the personalcomputer. Specifically, by formatting the plate memory by the exclusivedevice for file system such as FAT, the ROM data file preliminarilycreated on the personal computer can be recorded into the FAT filesystem, so that the ROM data file can be easily written into the platememory 7 from the personal computer.

[0124]FIG. 7C shows an example of header data of the ROM data file. InFIG. 7C, as the discrimination data 56, ABC DEF MEMSTICK PROGRAM LOADERis stored, and as the file name 57, romdata.dat is stored, and after aspace 58, 0×00A3, 0×003F, 0×FFFF are stored as the physical blockaddress data 59.

[0125] At step S15, the plate memory is removed from the personalcomputer. Specifically, by detaching the plate memory from the specifiedinterface, it is removed from the personal computer.

[0126] At step S16, the plate memory discrimination file for loader iscreated by the exclusive device. Specifically, in the composition of thephysical address file shown in FIG. 6, at the position of the header 40,as the header data of discrimination file shown in FIG. 7A, for example,ABC DEF MEMSTICK PROGRAM LOADER LOAD FROM PC is stored as thediscrimination data 50 when loading from the personal computer, andafter a space 51, “32” is entered as the number of pages 52 indicatingthe storage region per block. In FIG. 7B, further, when loading from theplate memory, ABC DEF MEMSTICK PROGRAM LOADER LOAD FROM MS is stored asthe discrimination data 53, and after a space 54, “16” is entered as thenumber of pages 55 indicating the storage region per block.

[0127] At step S17, the address file of program loader file is createdin the exclusive device. Specifically, as explained in FIG. 1, in theexclusive device, the physical address table 67 is provided, forexample, in the RAM, and by the address file processing unit 65 realizedby the function of the microcomputer 1 for starting the address fileprocessing when the start key of processing of address file in theoperation unit is pressed, immediately referring to the physical addresstable 67, the physical address on the flash memory corresponding to thelogical address of the specified program loader file is acquired, andthe physical address of the program loader file is written by accessingthe plate memory 7 by the physical address writing processing unit 66realized by the function of the microcomputer 1.

[0128] At step S18, the address file of ROM data file is created in theexclusive device. Specifically, as explained in FIG. 1, in the exclusivedevice, the physical address table 67 is provided, for example, in theRAM, and by the address file processing unit 65 realized by the functionof the microcomputer 1 for starting the address file processing when thestart key of processing of address file in the operation unit ispressed, immediately referring to the physical address table 67, thephysical address on the flash memory corresponding to the logicaladdress of the specified ROM data file is acquired, and the physicaladdress of the ROM data file is written by accessing the plate memory 7by the physical address writing processing unit 66 realized by thefunction of the microcomputer 1.

[0129] Referring now to FIG. 8, the operation of rewriting the programstored in the flash ROM 2 incorporated in the microcomputer 1 in FIG. 2is explained.

[0130]FIG. 8 shows the data stored in the internal ROM of the platememory 7 assigned with the physical block address.

[0131] In the physical block address 0×0004 in FIG. 8, thediscrimination file in FIG. 7B is recorded. This is the plate memorydiscrimination file for loader stored in the plate memory 7 in FIG. 2.

[0132] In the physical block address 0×0052 in FIG. 8, the ROM dataaddress file in FIG. 7C is recorded. This is the ROM data address file12 stored in the plate memory 7 in FIG. 2.

[0133] In the physical block address 0×00A2 in FIG. 8, the programloader address file in FIG. 7D is recorded. This is the program loaderaddress file 10 stored in the plate memory 7 in FIG. 2.

[0134] In the physical block address 0×0041 in FIG. 8, there is theprogram loader file 9 recorded in the plate memory 7 in FIG. 2.

[0135] The data stored in the physical block addresses 0×00A3 and 0×003Fin FIG. 8 are the data for composing the ROM data file 11 stored in theplate memory 7 in FIG. 2.

[0136] When rewriting the program stored in the flash ROM 2 incorporatedin the microcomputer 1 provided in the personal digital assistant 20,first, the program for preparing program rewrite stored in the flash ROM2 is stated.

[0137] This program for preparing program rewrite accesses the platememory 7 shown in FIG. 8 by instructing sequentially from the beginningaddress by the physical block address, and judges if there is a headerindicating the plate memory discrimination file for loader 8 as shown inFIG. 7B or not at the specified position of the data being read out fromthe block instructed by the physical block address.

[0138] When the data is recorded as shown in FIG. 8, if the physicalblock address 0×0004 is read out, it is judged that the program and datafor rewriting the program stored in the flash ROM 2 incorporated in themicrocomputer 1 provided in the personal digital assistant 20 arerecorded in the installed plate memory. That is, when reading out theblock of physical block address 0×004, a character string ABC DEFMEMSTICK PROGRAM LOAD FROM MS is recognized, and therefore it is judgedthat the program loader file or ROM data file is recorded in theinstalled plate memory.

[0139] When it is judged that the plate memory discrimination file forloader 8 is recorded in the installed plate memory, successively, theprogram loader address file 10 and ROM data address file 12 are detectedfrom within the plate memory.

[0140] Specifically, reading out the blocks sequentially from thephysical block address 0×0000, if the program loader address file 10 isfound, the block corresponding to FIG. 7D in which a character stringABC DEF MEMSTICK PROGRAM LOADER loader.dat is recorded is searched. Inthe case of the ROM data address file 12, the block corresponding toFIG. 7C in which a character string ABC DEF MEMSTICK PROGRAM LOADERromdata.dat is recorded is searched.

[0141] If the data is recorded as shown in FIG. 8, at the physical blockaddress 0×0052, the program loader address file is detected, and at thephysical block address 0×00A2, the ROM data address file is detected.

[0142] When the program loader address file 10 is detected, themicrocomputer 1 reads out the physical address in which the program forrewriting the flash ROM 2 recorded in the plate memory 7, from theprogram loader address file 10. In the case of FIG. 8, first 0×0041 isread out from the position of the physical block address data 73 in FIG.7D.

[0143] The microcomputer 1 reads out the program loader file from theblock of 0×0041 of the plate memory 7 according to the physical blockaddress 0×0041, and stores it in the internal RAM 3. To judge if theprogram loader file continuing from the program loader address file 10to the block of 0×0041 is recorded in the plate memory 7 or not, thenext physical block address is read out from the position of thephysical block address data 73 in FIG. 7D. In this example, since thedata to be read out next is 0×FFFF, it is judged there is no programloader file continuing from the physical block address 0×0041.

[0144] Consequently, the microcomputer 1 reads out the physical blockaddress 59 in FIG. 7C from the detected ROM data address file, and0×00A3 is read out as the first physical block address. On the basis ofthe physical block address 0×000A3 being read out, the microcomputer 1reads out 1st ROM Data from the block of the physical block address0×00A3 of the plate memory 7, and stores it in the external RAM 6provided in the personal digital assistant 20. In succession, themicrocomputer 1 reads out 0×003F as the second physical block addressfrom the physical block address data 59 of the ROM data address file inFIG. 7C. On the basis of the physical block address 0×003F being readout, the microcomputer 1 reads out one block of 2nd ROM Data from thephysical block address 0×003F of the plate memory 7, and stores it inthe external RAM 6. Further, the microcomputer 1 reads out the terminalend data 0×FFFF as the next physical address from the physical blockaddress data 59 of the ROM data address file in FIG. 7C, and recognizesthat there is no further ROM data, and terminates the reading process ofROM data.

[0145] When the program loader file 9 and ROM data file 11 are stored inthe internal RAM 3 and external RAM 6, respectively, the program forrewriting the program stored in the flash ROM 2 transfers the controlright to the program loader file stored in the internal RAM 3 so as tooperate the program loader file stored in the internal RAM 3.Specifically, it is instructed to the microcomputer 1 to jump to theexecution start position of the program loader stored in the internalRAM 3.

[0146] The program loader stored in the internal RAM 3 provided with theexecution control right is programmed so as to control the outputterminal 5 of the microcomputer 1, and controls the output terminal 5 sothat the write enable terminal 4 may be set in write enable state of theflash ROM 2 through the jumper wire 14.

[0147] In succession, the program loader stored in the internal RAM 3erases at least the region storing the data for replacing the datastored in the flash ROM stored in the external RAM 6, and writes thedata stored in the external RAM 6 into the specified block in the flashROM 2. After completion of writing, controlling the output terminal 5,the write enable terminal 4 is set in a write disable state of the flashROM 2, and then the boot loader transfers the control right to theprogram stored in the flash ROM 2, and the rewriting process of theflash ROM 2 is terminated. Specifically, it is executed by jumping tothe address for starting execution in the initial state of the programstored in the flash ROM 2.

[0148] Referring to the file system processing hierarchy in FIG. 1, thisis to explain the procedure of acquiring the physical address of theprogram loader file and ROM data file at step S17 and step S18 in theflowchart in FIG. 5.

[0149] In FIG. 1, first, the beginning cluster number is obtained fromthe directory of the application processing layer 60 and the continuouscluster numbers from the FAT, in the address file processing unit 65.Second, the cluster numbers obtained in the first process are convertedinto physical addresses by referring to the physical address table 67.As a result, the physical addresses of the desired program loader fileand ROM data file can be obtained. Thus, the physical address iscalculated from the cluster number of logical address.

[0150] [Structure of FAT] As explained in the file system hierarchy inFIG. 1, the file management process is executed by the FAT. That is, bythe personal digital assistant 20 having the structure as shown in FIG.2, to realize recording and reproducing of data, that is, writing andreading, in the plate memory 7, the FAT refers to the file storageposition management according to the request in the application process,and further the actual access is executed by logical-physical addressconversion. Herein, the structure of the FAT is explained.

[0151] An outline of management structure by the FAT is shown. In thisembodiment, the FAT and logical-physical address conversion table arestored in the plate memory 15, and the FAT structure is the managementstructure in the plate memory.

[0152] The FAT management structure consists of partition table, emptyregion, boot sector, FAT, FAT copy, route directory, and data region. Inthe data region, the unit data is shown as cluster 2, cluster 3, and soforth, and the cluster is the management unit, or one data unit handledin the FAT. Generally, in the FAT, the standard cluster size is 4 kbytes, but the cluster size may be specified somewhere between 512 bytesand 32 k bytes in the magnitude of the power of 2.

[0153] In the plate memory of the invention, one block is 8 k bytes or16 k bytes, and in the case of the plate memory 15 of 1 block=8 k bytes,the cluster handled in the FAT is 8 k bytes. In the case of the platememory 1 of 1 block=16 k bytes, the cluster handled in the FAT is 16 kbytes. That is, 8 k bytes or 16 k bytes is the data unit on the FATmanagement, and is also one data unit as block in the plate memory.Therefore, from the viewpoint of the late memory, the cluster sizehandled in the FAT is the block size of the plate memory. In thefollowing explanation of the embodiment, for the sake of simplicity, itis assumed block=cluster.

[0154] The block numbers are indicated as x, . . . , (x+m−1), (x+m),(x+m+1), (x+m+2), . . . , and in each block, various data composing theFAT structure are stored. Actually, however, the information is notalways stored in the physically continuous blocks.

[0155] In the FAT structure, first in the partition table, the beginningand end addresses of the FAT. partition of maximum 2G bytes aredescribed. In the boot region, the distinction of so-called 12-bit FATand 16-bit FAT, and size, cluster size, and region size as FAT structureare described.

[0156] The FAT is the table showing the link structure of the clustersfor composing each file as mentioned below, and a copy of the FAT isdescribed in the succeeding region. In the route directory, the filename, beginning cluster number and attributes are described. For thesedescriptions, 32 bytes is used for one file.

[0157] [File structure of plate memory] [Composition of directory] Thefile structure to be stored in the plate memory is explained. An exampleof directory composition is shown in the first place. As mentionedearlier, the main data to be handled in the plate memory include movingimage data, still image data, audio data, music data or high qualityaudio data reproduced from CD or MD, and control data, and hence as thedirectory composition, from the route directory, VOICE (directory forspeech), DCIM (directory for still image), MOxxxxnn (directory formoving image), AVCTL (directory for control), and HIFI (directory formusic) are distributed.

[0158] In particular, the file of audio data is explained below. Assub-directory files of directory VOICE, order file (ORDER.MSF),additional information management file (INFO.MSF), folder (FOLDER1,FOLDER2, . . . ) and others are formed. In the folder, for example, aspeech data file (file name 98120100.MSV) of actual audio data isformed.

[0159] [Speech data file] A data structure of speech data file is shown.The speech data file comprises format frame, TOC frame, title frame,maker frame, author frame, space frame, and data frame. Among them, thetitle frame, maker frame and author frame are arbitrary, and basicallythe speech data file is composed of format frame, TOC frame, spaceframe, and data frame.

[0160] The format frame is the basic management information of speechdata file, and types of CODEC are shown. The TOC frame is the managementinformation showing the array state of each frame of the speech datafile. That is, by the description of the TOC frame, the frame structureof the speech data file is identified. The data frame is a region inwhich actual speech data is stored. The speech frame is, as described indetail later, an unused area, and it functions as a reserve region whenextending the TOC frame or is used for setting reproduction disable areain the file.

[0161] Of these frames, the data frame and space frame may exist in aplurality within a same file. However, other frames than the data frameand space frame are allowed by only one in a same file. The format frameis always positioned at the beginning of the file. The TOC frame comesright after the format frame. Other arbitrary frames (title frame, makerframe, and author frame) are put together after the TOC frame. Theseframes are arranged from the smaller ID number. These arbitrary framesare followed immediately by the space frame.

[0162] In divide processing of speech data file, in the clusterincluding the division point, the data area which is not reproduced is aspace frame. That is, when a division point is set at an intermediateposition of the cluster, in the latter file after the division, thebeginning of the speech data is the division point of the cluster. Sincethe minimum unit of the file is always a cluster, the data before thedivision point in the cluster includes the data that cannot bereproduced, but this portion is included in the space frame so as not tobe reproduced.

[0163] As a result of divide and couple process of speech data file, twospace frames may be adjacent to each other. In such a case, two adjacentspace frames are assembled into one space frame. That is, they aremanaged as one space frame in the TOC frame.

[0164] Herein, as the embodiment, the personal digital assistant, platememory, and flash ROM rewriting operation by using them are described,but the invention is not limited to such structure and operation alone.In particular, in the system using the plate memory, examples are aboutrewriting process of ROM data for writing, reading or erasing the audiodata file or voice data file handling audio data or voice data as maindata, but in this plate memory system, as mentioned above, aside fromthe voice data file, music data file or other audio data file, movingimage data file or other image data file can be also handled. In suchaudio data file or video data file, by rewriting the ROM data same asmentioned above, the operation of the microcomputer in the personaldigital assistant 20 can be stabilized.

[0165] In this way, by using the FAT file system as file system, andusing the flash memory through the detachable mechanism as the recordingmedium, in the personal digital assistant having the microcomputercapable of rewriting the ROM data by the function of recording orreproducing the stream data such as audio data of speech and music, theROM data can be rewritten without disassembling the microcomputer, andthe operation of the microcomputer in the personal digital assistant 20can be stabilized, so that the controllability and maintainability whenupdating or repairing the ROM data can be enhanced.

[0166] In the foregoing description, the FAT or FAT file system refersto the file management system in the nonvolatile memory for composingthe plate memory. The recording medium used in the personal digitalassistant in the embodiment is not limited to the plate memory as shownin FIG. 2, but includes the solid memory media of different shapes, suchas memory chip, memory card, memory module, MultiMediaCard (MMC)proposed by Toshiba, Matsushita, SanDisk, Hitachi, Motorola, NEC andNokia, SD (Secure Digital) Memory Card proposed by Toshiba, Matsushitaand SanDisk, or PC card. The format of the file system explained so faris not limited to the FAT file system, but other file systems may bealso used, or the specification of the detail may be changed or modifiedas required. Variations of the capacity of the flash memory are notlimited to the mentioned examples. Of course, the memory element of thestorage medium of the embodiment is not limited to the flash memory, butother memory elements or programmable compact discs may be used.

[0167] All functions for rewriting the flash ROM 2 which is thenonvolatile memory in the invention may not be supplied from the platememory 7 only, but only part of the functions for rewriting the flashROM 2 may be supplied from the plate memory 7.

[0168] The personal digital assistant of the invention comprises arecording medium detachably provided in the main body for storing therewrite program for executing rewrite of program data, and resettingmeans for controlling the control means to cancel the rewrite disablestate of the rewrite disable means at least once on the basis of therewrite program when installing the recording medium, and therefore thefunction for

[0169] Having described preferred embodiments of the invention withreference to the accompanying drawings, it is to be understood that theinvention is not limited to those precise embodiments and that variouschanges and modifications could be effected therein by one skilled inthe art without departing from the spirit or scope of the invention asdefined in the appended claims.

What is claimed is:
 1. A data rewriting apparatus capable of detaching arecording medium which stores update data for updating the data storedin the data rewriting apparatus, program data for transferring theupdate data to the data rewriting apparatus, and discrimination data fordiscriminating recording of the update date and program data,comprising: loading means for inserting said detachable recording mediuminto the apparatus main body; first memory means for reading and storingthe program data for transferring the update data into the datarewriting apparatus recorded on the recording medium; detecting meansfor detecting the discrimination data from the recording medium; secondmemory means provided inside the rewriting apparatus for storing thedata to be updated; and control means for reading out the program datafor transferring the update data into the data rewriting apparatus onthe basis of the detected discrimination data from the recording mediumand storing into the first memory means, when the discriminating data isdetected from the recording medium by the detecting means, reading outthe updated data recorded in the recording medium on the basis of theprogram data stored in the first memory means, and updating the datastored in the second memory means in the data rewriting apparatus. 2.The data rewriting apparatus of claim 1, wherein said update data isprogram data for operating the data rewriting apparatus.
 3. The datarewriting apparatus of claim 1, further comprising: third memory meansstoring load program data for transferring and storing the program datafor transferring said update data recorded in the recording medium tosaid first memory means.
 4. The data rewriting apparatus of claim 1,further comprising: limiting means for limiting a rewrite of data storedin the data rewriting apparatus, wherein limit of rewrite is cleared bythe program data stored in the memory means.
 5. The data rewritingapparatus of claim 2, wherein limit of rewrite is cleared after readingthe program data for transferring the update data to the data rewritingapparatus.
 6. The data rewriting apparatus of claim 1, wherein the datastored in the data rewriting apparatus is stored in nonvolatile memorymeans.
 7. The data rewriting apparatus of claim 1, further comprising:fourth memory means, wherein the update data for updating the datastored in the data rewriting apparatus is used for updating the datastored in the second memory means of the data rewriting apparatus, afterbeing stored in said fourth memory means.
 8. The data rewritingapparatus of claim 1, wherein said control means searches first positiondata indicating the position of the program data for transferring theupdate data to the data rewriting apparatus recorded in said recordingmedium, and reads out the program data according to the first positiondata being searched.
 9. The data rewriting apparatus of claim 1, whereinsaid control means searches second position data indicating the positionof the update data for updating the data stored in the data rewritingapparatus recorded in said recording medium, and reads out the updatedata recorded in the recording medium according to the second positiondata being searched.
 10. A control method of storing update data bytransferring into a data rewriting apparatus from the data rewritingapparatus and a detachable recording medium storing update data forupdating the data stored in the data rewriting apparatus, program datafor transferring the update data to the data rewriting apparatus, anddiscrimination data for discriminating recording of the update date andprogram data, comprising: a step of detecting the discrimination datafrom the recording medium; a step of reading out the program data fromthe recording medium on the basis of the detected discrimination datawhen the discrimination data is detected from the recording medium; anda step of reading out the update data for updating the data stored inthe data rewriting apparatus from the recording medium on the basis ofthe program data being readout, and updating the data stored in theapparatus by the update data being read out.
 11. The control method ofclaim 10, wherein the program data is stored in temporary storage meansprovided in the data rewriting apparatus.
 12. The control method ofclaim 10, further comprising: a step of temporarily storing the updatedata recorded in the recording medium, in temporary storage meansprovided in the data rewriting apparatus.
 13. The control method ofclaim 10, wherein the step of detecting the discrimination data of thecontrol method is to detect the discrimination data by checking ifspecified data pattern is present or not in each block of specified sizefor composing the recording medium.
 14. The control method of claim 10,the step of updating the data of the control method is to update thedata after erasing the data at the position to be updated stored in thedata rewriting apparatus.
 15. The control method of claim 10, furthercomprising: a step of searching first position data indicating theposition of the update data recorded in the recording medium, prior tothe step of: reading the update data for updating the data stored in thedata rewriting apparatus from the recording medium, wherein the updatedata for updating the data stored in the data rewriting apparatus isread in from the recording medium according to the first position data.16. The control method of claim 10, further comprising: a step ofsearching second position data indicating the position of the programdata for transferring the update data to the data rewriting apparatusrecorded in the recording medium, wherein the program data is read outaccording to the second position data.
 17. A recording mediumcomprising: an update data recording region for recording the updatedata for updating the data stored in the installed data rewritingapparatus; a program data recording region for recording the programdata for transferring the update data to the data rewriting apparatus;and a discrimination data recording region for recording thediscrimination data for discriminating recording of the update data andprogram data.
 18. The recording medium of claim 17, further comprising:a first position recording region for recording first position dataindicating the position of the update data recorded in the recordingmedium.
 19. The recording medium of claim 17, further comprising: asecond position recording region for recording second position dataindicating the position of the program data recorded in the recordingmedium.
 20. The recording medium of claim 18, further comprising: amanagement data recording region for recording management data formanaging the data recorded in the recording medium, aside from the firstposition recording region in which the first position data is recorded.